home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- REM
- REM If you have an old version of DOS you may need to remove the
- REM "@" from the first line to make it work.
- REM
- REM To make ECHO print an empty line I specify a parameter of
- REM chr$(255). To do this follow the ECHO command with a space
- REM and then while holding down the ctrl and alt keys type 255 on
- REM the number pad. Numbers on the keyboard will not work!
- ECHO
- ECHO TRANSLATE - Copyright 1990 by Gil Yoder
- ECHO P.O. Box 307 - Coalgate, OK 74538
- ECHO CIS# 73237,3103
- ECHO
- REM
- REM Handle command lines with possibly more than 9 parameters.
- SET TR=%1 %2 %3 %4 %5 %6 %7 %8 %9
- :LOOP
- SHIFT
- IF "%9" == "" GOTO ENDLOOP
- SET TR=%TR% %9
- GOTO LOOP
- :ENDLOOP
- REM
- TRANSLAT %TR%
- REM
- REM Handle errors
- IF ERRORLEVEL 4 GOTO BADPARAM
- IF ERRORLEVEL 3 GOTO TOOMANY
- IF ERRORLEVEL 2 GOTO NOPARAM
- IF ERRORLEVEL 1 GOTO ODDPARAM
- REM
- REM If TRANSLATE loaded correctly
- ECHO Thank you for using TRANSLATE!
- GOTO END
- :BADPARAM
- ECHO BAD PARAMETER: Correct and retry.
- ECHO
- :NOPARAM
- ECHO SYNTAX: TRANS oooo nnnn [oooo nnnn...]
- ECHO
- ECHO LEGEND: oooo 4 digit hex value for key to translate
- ECHO nnnn 4 digit hex value, new value for old key
- ECHO
- ECHO Proper values for digits are 0123456789ABCDEF. Use zeros
- ECHO to left pad values less than 1000 hex. Lower case
- ECHO characters are not allowed.
- ECHO
- ECHO Up to five pairs may be specified.
- GOTO END
- :TOOMANY
- ECHO TOO MANY PARAMETERS: Correct and retry.
- ECHO
- GOTO NOPARAM
- :ODDPARAM
- ECHO PARAMETERS NOT PAIRED: Correct and retry.
- ECHO
- GOTO NOPARAM
- :END
- SET TR=
-